package cn.wcy.design_patterns.test.Controller.demo1;

import org.springframework.stereotype.Component;

@Component
class WangWuHandler extends AbstractHandler {

    @Override
    public String BBB() {
        // 业务逻辑B
        System.out.println("王五完成了B任务");
        return "王五完成了B任务";
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        Factory.register("王五", this);
    }
}